/**
 * 
 */
package com.yi.resources.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.yi.model.internal.impl.ModelInitializer;

/**
 * @author yilo
 *
 */
@Controller
@RequestMapping("/install")
public class InstallController {
	private ModelInitializer modelInitializer;

	public ModelInitializer getModelInitializer() {
		return modelInitializer;
	}

	public void setModelInitializer(ModelInitializer modelInitializer) {
		this.modelInitializer = modelInitializer;
	}
	
	@RequestMapping(method=RequestMethod.GET)
	public ModelAndView initialize(final HttpServletRequest request, final HttpServletResponse response){
		modelInitializer.initialize();		
		final ModelAndView mav = new ModelAndView("install");
		return mav;
	}
}
